namespace java own.stu.jobgib.playown.thrift

typedef i32 Integer
typedef string String
typedef bool boolean

struct Person{
    1: Integer id,
    2: String name,
    3: Integer age,
    4: boolean isMarried
}

exception DataException{
    1: Integer code,
    2: String message
}

service PersonService{
    Person getById(1: Integer id),
    void save(1: Person person) throws (1: DataException ex)
}

// thrift -r -out src\main\java -gen java src\main\java\own\stu\jobgib\playown\thrift\data.thrift